The present invention is related to an image-pickup apparatus such as a digital still camera or a video camera, and is specifically related to an image-pickup apparatus which uses image-pickup pixels and focus detection pixels in an image-pickup element to perform focus control with a contrast detection method.
Japanese Patent Laid-Open No. 2000-156823 discloses an image-pickup apparatus, in which some pixels (focus detection pixels) included in an image-pickup element used in the apparatus are provided with different optical characteristics from those of other pixels to perform focus detection based on outputs from the focus detection pixels.
In the image-pickup apparatus disclosed in Japanese Patent Laid-Open No. 2000-156823, plural focus detection pixels paired with each other are arranged in part of the image-pickup element. FIG. 9 shows one example of a pixel arrangement of the image-pickup element in which the focus detection pixels are arranged in some of the lines of the pixel matrix.
In FIG. 9, reference symbols R, G, and B respectively represent normal image-pickup pixels provided with a red filter, a green filter, and a blue filter. Reference symbols S1 and S2 respectively represent a first focus detection pixel and a second focus detection pixel (phase difference detection pixels) which have different optical characteristics from those of the image-pickup pixels.
FIG. 10 shows the structure of a first focus detection pixel S1. In FIG. 10, a microlens 501 is formed on a light-entrance side of the first focus detection pixel. Reference numeral 502 denotes a planar layer forming a flat surface for providing the microlens 501.
Reference numeral 503 denotes a light-shielding layer, which has an aperture decentered to one direction relative to the center O of a photoelectric conversion area 504 of the first focus detection pixel S1.
FIG. 11 shows the structure of a second focus detection pixel S2. In FIG. 11, a microlens 601 is formed on a light-entrance side of the second focus detection pixel. Reference numeral 602 denotes a planar layer forming a flat surface for providing the microlens 601.
Reference numeral 603 denotes a light-shielding layer, which has an aperture decentered relative to the center O of a photoelectric conversion area 604 of the second focus detection pixel S2. The aperture of the light-shielding layer 603 is decentered in a direction opposite to that of the light-shielding layer 503 provided in the first focus detection pixel S1. That is, the light-shielding layers 503 and 603 have their apertures at symmetric positions relative to the optical axis of the microlenses of the first and second focus detection pixels S1 and S2.
With such a structure, viewing an image-pickup optical system from the first focus detection pixel S1 and from the second focus detection pixel S2 is equivalent to symmetrically dividing a pupil of the image-pickup optical system.
In FIG. 9, in the line containing the first focus detection pixels S1 and in the line containing the second focus detection pixels S2, two images (pair of images) are formed which are more approximate to each other as the number of pixels in the image-pickup element increases. When the image-pickup optical system is in an in-focus state relative to an object, outputs (image signals) obtained from the lines respectively containing the first and second focus detection pixels S1 and S2 match with each other.
On the other hand, when the image-pickup optical system is out of focus, a phase difference is generated in the image signals obtained from the lines respectively containing the first and second focus detection pixels S1 and S2. Directions of the phase difference in a front focus state and in a rear focus state are opposite to each other.
FIGS. 12A and 12B show the relationships between the focus state and the phase difference. In these drawings, the focus detection pixels S1 and S2 are illustrated closer to each other and designated by symbols A and B. The image-pickup pixels are omitted.
The light flux from a specific point on the object is divided into a light flux ΦLa and a light flux ΦLb, the former entering a focus detection pixel A through a divided pupil corresponding to the focus detection pixel A and the latter entering a focus detection pixel B through a divided pupil corresponding to the focus detection pixel B.
These light fluxes come from the identical point on the object. Therefore, when the image-pickup optical system is in an in-focus state, they pass through the same microlens and reach one point on the image-pickup element as shown in FIG. 12A. Accordingly, the image signals respectively obtained from the lines containing the first focus detection pixels A (S1) and second focus detection pixels B (S2) match with each other.
On the other hand, as shown in FIG. 12B, when the image-pickup optical system is out of focus by x, the reaching positions of both light fluxes ΦLa and ΦLb are offset from each other by a change in the incident angle of the light fluxes ΦLa and ΦLb onto the microlenses. Therefore, a phase difference is generated between the image signals respectively obtained from the lines containing the first focus detection pixels A (S1) and second focus detection pixels B (S2).
The image-pickup apparatus disclosed in Japanese Patent Laid-Open No. 2000-156823 performs the focus detection with the image-pickup element utilizing the above principle.
In addition, Japanese Patent Laid Open No. 2001-305415 discloses an image-pickup apparatus which can switch a focus control method between a phase difference detection method and a contrast detection method by using an image-pickup element similar to the image-pickup elements disclosed in Japanese Patent Laid Open No. 2000-156823. This image-pickup apparatus selects and performs focus control suited for respective detections of a horizontal line and a vertical line as an object.
When performing focus control with the contrast detection method as in the image-pickup apparatus disclosed in Japanese Patent Laid Open No. 2001-305415, contrast evaluation may be inaccurate if noise contaminates a brightness signal obtained by photoelectric conversion of an object image. In order to suppress such an adverse influence due to the noise contamination, it is preferable to improve an S/N ratio of the contrast evaluation by setting a great number of sample positions (or areas) for performing contrast evaluation in an image-pickup range and integrating the evaluation results with these sample positions.
However, if the number of the sample positions is increased, the size of a contrast evaluation area including all of these sample positions will increase. In this case, plural objects at different distances from each other are easily present in the contrast evaluation area simultaneously, and therefore the contrast evaluation may be incorrectly performed due to so-called “near and far objects in the frame”.